package com.gxa.hotel.core.pojo.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.time.LocalDateTime;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author czj
 * @since 2022-07-20
 */
@Getter
@Setter
@TableName("tb_coupon_info")
@ApiModel(value = "CouponInfo对象", description = "")
public class CouponInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("优惠券编号")
    @TableId(value = "ci_aid",type = IdType.AUTO)
      private String ciAid;

    @ApiModelProperty("优惠券名称")
    @TableField("ci_coupon_name")
    private String ciCouponName;

    @ApiModelProperty("优惠方式")
    @TableField("ci_coupon_type")
    private Boolean ciCouponType;

    @ApiModelProperty("抵扣金额")
    @TableField("ci_money")
    private Double ciMoney;

    @ApiModelProperty("门槛")
    @TableField("ci_threshold")
    private Double ciThreshold;

    @ApiModelProperty("起始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using=LocalDateTimeDeserializer.class)
    @TableField("ci_start_time")
    private LocalDateTime ciStartTime;

    @ApiModelProperty("过期时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @JsonSerialize(using = LocalDateTimeSerializer.class)
    @JsonDeserialize(using= LocalDateTimeDeserializer.class)
    @TableField("ci_end_time")
    private LocalDateTime ciEndTime;

    @ApiModelProperty("状态")
    @TableField("ci_state")
    private Boolean ciState;

    @ApiModelProperty("发放数量")
    @TableField("ci_number")
    private Integer ciNumber;

    @ApiModelProperty("每人限领")
    @TableField("ci_limited")
    private Integer ciLimited;


}
